package com.gofaraway.web.controller;

import com.gofaraway.service.shipment.ShipmentManageService;
import com.gofaraway.service.facade.request.ShipmentSearchRequest;
import com.gofaraway.service.facade.response.ShipmentResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

/**
 * @author ChenPeng
 * @Date 2024/1/18 15:20
 */
@RestController
@RequestMapping("/shipment")
public class QueryShipmentController {

    @Autowired
    private ShipmentManageService shipmentManageService;


    @PostMapping("/page_list")
    public List<ShipmentResponse> shipmentPageSearch(@RequestBody @Valid ShipmentSearchRequest request) {
        return shipmentManageService.shipmentSearch(request);
    }

}
